<template>
	<view class="" v-if="devicenav.length">
		<u-navbar :is-back="true" :border-bottom="false" title="应用场景" height="46" title-color="#333" :title-bold="true"
		 :title-size="36">
		</u-navbar>
		<u-tabs name="name" :list="devicenav" :current="current" @change="change" :bar-width="100" active-color="#c40200"
		 :bar-style="{backgroundColor:'#c40200',height:'5rpx',borderRadius: '5rpx',marginBottom:'-6rpx'}" class="device-tabs"></u-tabs>
		 <u-line color="#e5e5e5" />
		 <view class="">
		 	{{devicenav[current].ndesc}}
		 </view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			devicenav: [],
			current: 0,
			}
	},
	onLoad() {
		this.devicescene()
	},
	methods:{
		async devicescene(){
			let params = {
				cmd: 'nSceneColumn_list',
				para: {
					"pageindex": 1,
					"pagesize": 20,
				}
			}
			const res = await this.$u.api.devicescene(params)
			this.devicenav=res.Data.Data
			console.log(this.devicenav)
		},
		change(index) {
			this.current = index;
		}
	}
}
</script>

<style scoped lang="scss">
	
</style>
